<?php 
 function ludou_create_media_category() {
    $args = array(
      'label' => '媒体分类',
      'hierarchical' => true,
      'show_admin_column' => true,
      'show_ui'      => true,
      'query_var'    => true,
      'rewrite'      => true,
    );
  
    register_taxonomy( 'attachment_category', 'attachment', $args );
  }
  
  add_action( 'init', 'ludou_create_media_category' );
  add_filter( 'media_row_actions', 'wpdaxue_media_row_actions', 10, 2 );
  function wpdaxue_media_row_actions( $actions, $object ) {
      $actions['url'] = '<a href="'.wp_get_attachment_url( $object->ID ).'" target="_blank">URL</a>';
      return $actions;
  }
   
?>